]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
St: reference the StTheme from StThemeNode
authorGiovanni Campagna <gcampagna@src.gnome.org>
Mon, 25 Jun 2012 12:08:56 +0000 (14:08 +0200)
committerGiovanni Campagna <gcampagna@src.gnome.org>
Mon, 25 Jun 2012 12:12:07 +0000 (14:12 +0200)
This is a partial revert of 7eaf231e566e8a8470589e743bac10475c1ce987,
which caused segfaults. For some reason, StThemeNodes seem to survive
style changes.

src/st/st-theme-node.c

index 27a59f142bd0127d31b4a8ee0a6e2896c6d1875e..651de0240b4d6e1f09abf1c8b2e4f3795b90e43e 100644 (file)
@@ -85,6 +85,8 @@ st_theme_node_dispose (GObject *gobject)
       node->icon_colors = NULL;
     }
 
+  g_clear_object (&node->theme);
+
   G_OBJECT_CLASS (st_theme_node_parent_class)->dispose (gobject);
 }
 
@@ -194,6 +196,9 @@ st_theme_node_new (StThemeContext    *context,
   if (theme != NULL)
     node->theme = theme;
 
+  if (node->theme != NULL)
+    g_object_ref (node->theme);
+
   node->element_type = element_type;
   node->element_id = g_strdup (element_id);
   node->element_class = g_strdup (element_class);